package com.gongJiao.controller;


import com.gongJiao.common.Result;
import com.gongJiao.service.RouteSiteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2021-12-25
 */
@RestController
@RequestMapping("/route-site")
public class RouteSiteController {
    @Autowired
    RouteSiteService routeSiteService;

    /**
     * 根据路线id查询关联站点id字符串
     * @param id
     * @return
     */
    @GetMapping("getSitesByRoute/{id}")
    public Result getSitesByRoute(@PathVariable Long id){
        String ids=routeSiteService.getSitesByRoute(id);
        return Result.success("查询成功",ids);
    }
}

